package cc.booku.owlbox.OrdinaryBooks_norm;

import android.graphics.Color;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.view.View;
import android.widget.TextView;

import cc.booku.owlbox.ArtDesign.SystemUtil;
import cc.booku.owlbox.R;


public class PreViewActivity extends AppCompatActivity {

    private TextView preview_tv;
    private Toolbar Toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_preview);

        preview_tv = (TextView) findViewById(R.id.preview_tv);


        Bundle bundle = this.getIntent().getExtras();
        //接收name值

        String vod_content = bundle.getString("vod_content");

        init_toolbar();
        SystemUtil.setStatusBarColor(this, Color.parseColor("#448aca"));
        preview_tv.setText(vod_content);


    }


    private void init_toolbar() {
        Bundle bundle = this.getIntent().getExtras();
        String vod_name = bundle.getString("vod_name");
        Toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(Toolbar);//利用Toolbar代替ActionBar
        Toolbar.setTitle(vod_name);
        Toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }
}
